<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class template circular_buffer_space_optimized</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../../boost_circular_buffer_c___reference.html#doxygen.boost_circular_buffer_c___reference.space__optimized_8hpp" title="Header &lt;boost/circular_buffer/space_optimized.hpp&gt;">
<link rel="prev" href="base_8hpp_1a3f0eb1ea2997575395414c96401ad3f1.html" title="Function template swap">
<link rel="next" href="../../circular_buffer/s14.html" title="Index">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="base_8hpp_1a3f0eb1ea2997575395414c96401ad3f1.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_circular_buffer_c___reference.html#doxygen.boost_circular_buffer_c___reference.space__optimized_8hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../circular_buffer/s14.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template circular_buffer_space_optimized</span></h2>
<p>boost::circular_buffer_space_optimized — Space optimized circular buffer container adaptor. <code class="computeroutput">T</code> must be a copyable class or must have an noexcept move constructor and move assignment operator. </p>
</div>
<h2 class="refsynopsisdiv-title">Synopsis</h2>
<div class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../boost_circular_buffer_c___reference.html#doxygen.boost_circular_buffer_c___reference.space__optimized_8hpp" title="Header &lt;boost/circular_buffer/space_optimized.hpp&gt;">boost/circular_buffer/space_optimized.hpp</a>&gt;

</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">,</span> <span class="keyword">typename</span> Alloc<span class="special">&gt;</span> 
<span class="keyword">class</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a> <span class="special">:</span>
  <span class="keyword">private</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">circular_buffer</span><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span>
<span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
  <span class="comment">// <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimizedtypes">types</a></span>
  <span class="keyword">typedef</span> <a class="link" href="classboost_1_1circular__buffer.html" title="Class template circular_buffer">circular_buffer</a><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">value_type</span>             <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a1230db5cfef38275c285aea57a067276"></a><span class="identifier">value_type</span><span class="special">;</span>            
  <span class="keyword">typedef</span> <a class="link" href="classboost_1_1circular__buffer.html" title="Class template circular_buffer">circular_buffer</a><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">pointer</span>                <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1acbe74c642609f7e9e3b1f30236191598"></a><span class="identifier">pointer</span><span class="special">;</span>               
  <span class="keyword">typedef</span> <a class="link" href="classboost_1_1circular__buffer.html" title="Class template circular_buffer">circular_buffer</a><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">const_pointer</span>          <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a9b5647fe0d1351534d919d444f79219c"></a><span class="identifier">const_pointer</span><span class="special">;</span>         
  <span class="keyword">typedef</span> <a class="link" href="classboost_1_1circular__buffer.html" title="Class template circular_buffer">circular_buffer</a><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">reference</span>              <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1aa0b9382fb965166920739a43819105b9"></a><span class="identifier">reference</span><span class="special">;</span>             
  <span class="keyword">typedef</span> <a class="link" href="classboost_1_1circular__buffer.html" title="Class template circular_buffer">circular_buffer</a><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">const_reference</span>        <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a5e2a20f697f95a4a66fba23fd5f051b9"></a><span class="identifier">const_reference</span><span class="special">;</span>       
  <span class="keyword">typedef</span> <a class="link" href="classboost_1_1circular__buffer.html" title="Class template circular_buffer">circular_buffer</a><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">size_type</span>              <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1aab44f6e82b791a2ca6fe4e2a824c7883"></a><span class="identifier">size_type</span><span class="special">;</span>             
  <span class="keyword">typedef</span> <a class="link" href="classboost_1_1circular__buffer.html" title="Class template circular_buffer">circular_buffer</a><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">difference_type</span>        <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a2283eaadf46ead9e3bdd08b1da8f875e"></a><span class="identifier">difference_type</span><span class="special">;</span>       
  <span class="keyword">typedef</span> <a class="link" href="classboost_1_1circular__buffer.html" title="Class template circular_buffer">circular_buffer</a><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">allocator_type</span>         <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a9f9be2a0d0f121b50dba716229abda6c"></a><span class="identifier">allocator_type</span><span class="special">;</span>        
  <span class="keyword">typedef</span> <a class="link" href="classboost_1_1circular__buffer.html" title="Class template circular_buffer">circular_buffer</a><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">const_iterator</span>         <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a54dff912d3f2746a2f1e35654d799744"></a><span class="identifier">const_iterator</span><span class="special">;</span>        
  <span class="keyword">typedef</span> <a class="link" href="classboost_1_1circular__buffer.html" title="Class template circular_buffer">circular_buffer</a><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">iterator</span>               <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ad62129b314a125d92aa4bcdd0d5448f2"></a><span class="identifier">iterator</span><span class="special">;</span>              
  <span class="keyword">typedef</span> <a class="link" href="classboost_1_1circular__buffer.html" title="Class template circular_buffer">circular_buffer</a><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">const_reverse_iterator</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a61efdeeb3ae5d821bf5b9e71f1769116"></a><span class="identifier">const_reverse_iterator</span><span class="special">;</span>
  <span class="keyword">typedef</span> <a class="link" href="classboost_1_1circular__buffer.html" title="Class template circular_buffer">circular_buffer</a><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">reverse_iterator</span>       <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1aaac918f1c5910a0e79d90778521ea69f"></a><span class="identifier">reverse_iterator</span><span class="special">;</span>      
  <span class="keyword">typedef</span> <a class="link" href="classboost_1_1circular__buffer.html" title="Class template circular_buffer">circular_buffer</a><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">array_range</span>            <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a61b21c3fa54381d937d100b01aa8ee6f"></a><span class="identifier">array_range</span><span class="special">;</span>           
  <span class="keyword">typedef</span> <a class="link" href="classboost_1_1circular__buffer.html" title="Class template circular_buffer">circular_buffer</a><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">const_array_range</span>      <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1aa71029e2ada1b3e0918f549dc9470acb"></a><span class="identifier">const_array_range</span><span class="special">;</span>     
  <span class="keyword">typedef</span> <a class="link" href="classboost_1_1circular__buffer.html" title="Class template circular_buffer">circular_buffer</a><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">param_value_type</span>       <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1aaf233dea947b6242d4372be27c5b66d8"></a><span class="identifier">param_value_type</span><span class="special">;</span>      
  <span class="keyword">typedef</span> <a class="link" href="classboost_1_1circular__buffer.html" title="Class template circular_buffer">circular_buffer</a><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">rvalue_type</span>            <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1aecb14bc0149a5c3e01357058e6436c18"></a><span class="identifier">rvalue_type</span><span class="special">;</span>           
  <span class="keyword">typedef</span> <span class="identifier">cb_details</span><span class="special">::</span><span class="identifier">capacity_control</span><span class="special">&lt;</span> <span class="identifier">size_type</span> <span class="special">&gt;</span>           <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a933c430702644ca103c1657b807c32e4"><span class="identifier">capacity_type</span></a><span class="special">;</span>         

  <span class="comment">// <a class="link" href="../reference_section_of_boost_any/classboost_1_1anys_1_1unique__any.html#id4-bb">public member functions</a></span>
  <span class="keyword">bool</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1affedf30e9a331120b7935bd43bcd96c9"><span class="identifier">full</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="identifier">size_type</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a1235f424313eb295ea327db53a44f66f"><span class="identifier">reserve</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">const</span> <span class="identifier">capacity_type</span> <span class="special">&amp;</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7"><span class="identifier">capacity</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a49f28bc5b33d2062b9f6a33b48264e3f"><span class="identifier">set_capacity</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">capacity_type</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1af244ff5576b79f8d60e273c02d71c9f2"><span class="identifier">resize</span></a><span class="special">(</span><span class="identifier">size_type</span><span class="special">,</span> <span class="identifier">param_value_type</span> <span class="special">=</span> <span class="identifier">value_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a0f096c108ebde69ae83a9de41b3bea56"><span class="identifier">rset_capacity</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">capacity_type</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ad45e2e72d9e3fb42e090ebc47ac8d7ee"><span class="identifier">rresize</span></a><span class="special">(</span><span class="identifier">size_type</span><span class="special">,</span> <span class="identifier">param_value_type</span> <span class="special">=</span> <span class="identifier">value_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">explicit</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a8077e430e110ee99f5997257f33d0058"><span class="identifier">circular_buffer_space_optimized</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">allocator_type</span> <span class="special">&amp;</span> <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">explicit</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a741159a0511a4e0fed6eaab6d6959fa7"><span class="identifier">circular_buffer_space_optimized</span></a><span class="special">(</span><span class="identifier">capacity_type</span><span class="special">,</span> 
                                           <span class="keyword">const</span> <span class="identifier">allocator_type</span> <span class="special">&amp;</span> <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1af8c9fa872f9a84d454d7e245cc2eadbd"><span class="identifier">circular_buffer_space_optimized</span></a><span class="special">(</span><span class="identifier">capacity_type</span><span class="special">,</span> <span class="identifier">param_value_type</span><span class="special">,</span> 
                                  <span class="keyword">const</span> <span class="identifier">allocator_type</span> <span class="special">&amp;</span> <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ad29ce80b10d4a3250fedeb9427210d96"><span class="identifier">circular_buffer_space_optimized</span></a><span class="special">(</span><span class="identifier">capacity_type</span><span class="special">,</span> <span class="identifier">size_type</span><span class="special">,</span> <span class="identifier">param_value_type</span><span class="special">,</span> 
                                  <span class="keyword">const</span> <span class="identifier">allocator_type</span> <span class="special">&amp;</span> <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ad9f273c1a794f84484d220e977a3e24b"><span class="identifier">circular_buffer_space_optimized</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ad0cc9be3b639bf97ba2673a19862a98e"><span class="identifier">circular_buffer_space_optimized</span></a><span class="special">(</span><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span> <span class="special">&amp;&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> InputIterator<span class="special">&gt;</span> 
    <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1afa6f32d074d996d367dbe7cd2c614ca2"><span class="identifier">circular_buffer_space_optimized</span></a><span class="special">(</span><span class="identifier">InputIterator</span><span class="special">,</span> <span class="identifier">InputIterator</span><span class="special">,</span> 
                                    <span class="keyword">const</span> <span class="identifier">allocator_type</span> <span class="special">&amp;</span> <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> InputIterator<span class="special">&gt;</span> 
    <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a12a2c10a16b69388b782d71130f00625"><span class="identifier">circular_buffer_space_optimized</span></a><span class="special">(</span><span class="identifier">capacity_type</span><span class="special">,</span> <span class="identifier">InputIterator</span><span class="special">,</span> 
                                    <span class="identifier">InputIterator</span><span class="special">,</span> 
                                    <span class="keyword">const</span> <span class="identifier">allocator_type</span> <span class="special">&amp;</span> <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span> <span class="special">&amp;</span> 
  <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a72835f782ed2acda4074dff75f198373"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span> <span class="special">&amp;</span> 
  <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a86e286b7527809dbd2c6e0449aab4f64"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span> <span class="special">&amp;&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a7ca4fda9526d0dad99706763c3b2d9f1"><span class="identifier">assign</span></a><span class="special">(</span><span class="identifier">size_type</span><span class="special">,</span> <span class="identifier">param_value_type</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a108055ae3f6b1635e1428b0455902cbf"><span class="identifier">assign</span></a><span class="special">(</span><span class="identifier">capacity_type</span><span class="special">,</span> <span class="identifier">size_type</span><span class="special">,</span> <span class="identifier">param_value_type</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> InputIterator<span class="special">&gt;</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a14a79fa079775d0c6fefe6ed3bb34d5f"><span class="identifier">assign</span></a><span class="special">(</span><span class="identifier">InputIterator</span><span class="special">,</span> <span class="identifier">InputIterator</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> InputIterator<span class="special">&gt;</span> 
    <span class="keyword">void</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a7eaa049f1b889de9194cbe6419e90bbd"><span class="identifier">assign</span></a><span class="special">(</span><span class="identifier">capacity_type</span><span class="special">,</span> <span class="identifier">InputIterator</span><span class="special">,</span> <span class="identifier">InputIterator</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a4445d7daeeca1945880d45183217d53a"><span class="identifier">swap</span></a><span class="special">(</span><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a741062e21307061dc8d75e9189c0f592"><span class="identifier">push_back</span></a><span class="special">(</span><span class="identifier">param_value_type</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a43136bdd6c7a7856e2e6b09c87a4e451"><span class="identifier">push_back</span></a><span class="special">(</span><span class="identifier">rvalue_type</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1acb45532bece8fb04940e38005be341a8"><span class="identifier">push_back</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1acd85b7f08f1d7b99c40b898cff5116d4"><span class="identifier">push_front</span></a><span class="special">(</span><span class="identifier">param_value_type</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a03d43a8671be070303083a954f172dad"><span class="identifier">push_front</span></a><span class="special">(</span><span class="identifier">rvalue_type</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a05fc4b8702090590a2444745f7e1fd35"><span class="identifier">push_front</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a9c4290c18ab3dd2462dc01fb8368dff6"><span class="identifier">pop_back</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ad7d496c40fc053258ac7d19cf5261788"><span class="identifier">pop_front</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">iterator</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ab4a56a420d75236091bdeddb1b1224aa"><span class="identifier">insert</span></a><span class="special">(</span><span class="identifier">iterator</span><span class="special">,</span> <span class="identifier">param_value_type</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">iterator</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ac05b6756df1a0c5514a70453cd9b551b"><span class="identifier">insert</span></a><span class="special">(</span><span class="identifier">iterator</span><span class="special">,</span> <span class="identifier">rvalue_type</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">iterator</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a8e4ffef2a8d965f75c2a85dacbc3c327"><span class="identifier">insert</span></a><span class="special">(</span><span class="identifier">iterator</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1adc2060ce1105d80429ff3f004ca0691b"><span class="identifier">insert</span></a><span class="special">(</span><span class="identifier">iterator</span><span class="special">,</span> <span class="identifier">size_type</span><span class="special">,</span> <span class="identifier">param_value_type</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> InputIterator<span class="special">&gt;</span> 
    <span class="keyword">void</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1aa981fae21385a0210ea69ce4a4cb7b92"><span class="identifier">insert</span></a><span class="special">(</span><span class="identifier">iterator</span><span class="special">,</span> <span class="identifier">InputIterator</span><span class="special">,</span> <span class="identifier">InputIterator</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">iterator</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1affdfa9cdfa6f42ff67d8b463bc5af1f2"><span class="identifier">rinsert</span></a><span class="special">(</span><span class="identifier">iterator</span><span class="special">,</span> <span class="identifier">param_value_type</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">iterator</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a6b226205a56f026c7321acecf622f2e3"><span class="identifier">rinsert</span></a><span class="special">(</span><span class="identifier">iterator</span><span class="special">,</span> <span class="identifier">rvalue_type</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">iterator</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a55d78f0c560014f7b38776a24e832c3e"><span class="identifier">rinsert</span></a><span class="special">(</span><span class="identifier">iterator</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a1eff7ec0eb603d489bd12f8c48928c9d"><span class="identifier">rinsert</span></a><span class="special">(</span><span class="identifier">iterator</span><span class="special">,</span> <span class="identifier">size_type</span><span class="special">,</span> <span class="identifier">param_value_type</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> InputIterator<span class="special">&gt;</span> 
    <span class="keyword">void</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a689b81ea66407b95a20726a141feb54c"><span class="identifier">rinsert</span></a><span class="special">(</span><span class="identifier">iterator</span><span class="special">,</span> <span class="identifier">InputIterator</span><span class="special">,</span> <span class="identifier">InputIterator</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">iterator</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a36feadef225bd8a10962a92c4ffcdfd3"><span class="identifier">erase</span></a><span class="special">(</span><span class="identifier">iterator</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">iterator</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a9e9a4e0dfca27329da78e014d97201ca"><span class="identifier">erase</span></a><span class="special">(</span><span class="identifier">iterator</span><span class="special">,</span> <span class="identifier">iterator</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">iterator</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a6e96800422211d02621526c894b71fa1"><span class="identifier">rerase</span></a><span class="special">(</span><span class="identifier">iterator</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">iterator</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a54fd4c2a67c7d6de6cbf6c8255729e98"><span class="identifier">rerase</span></a><span class="special">(</span><span class="identifier">iterator</span><span class="special">,</span> <span class="identifier">iterator</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a2aa1dd29bd9509b5482ca2666c61deab"><span class="identifier">clear</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id-1.3.7.16.4.3.4"></a><h2>Description</h2>
<div class="refsect2">
<a name="id-1.3.7.16.4.3.4.2"></a><h3>
<a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimizedtypes"></a><code class="computeroutput">circular_buffer_space_optimized</code> 
        public
       types</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
<p>
<span class="keyword">typedef</span> <span class="identifier">cb_details</span><span class="special">::</span><span class="identifier">capacity_control</span><span class="special">&lt;</span> <span class="identifier">size_type</span> <span class="special">&gt;</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a933c430702644ca103c1657b807c32e4"></a><span class="identifier">capacity_type</span><span class="special">;</span></p>
<p>Capacity controller of the space optimized circular buffer.</p>
<p><b>See Also: </b>capacity_control in details.hpp. </p>
<p>
<code class="computeroutput"> class capacity_control<br>
 {<br>
 size_type m_capacity; // Available capacity.<br>
 size_type m_min_capacity; // Minimum capacity.<br>
 public:<br>
 capacity_control(size_type capacity, size_type min_capacity = 0)<br>
 : m_capacity(capacity), m_min_capacity(min_capacity)<br>
 {};<br>
 size_type capacity() const { return m_capacity; }<br>
 size_type min_capacity() const { return m_min_capacity; }<br>
 operator size_type() const { return m_capacity; }<br>
 };<br>
 </code> </p>
<p>Always <code class="computeroutput">capacity &gt;= min_capacity</code>. </p>
<p>The <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a></code> represents the capacity of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> and the <code class="computeroutput">min_capacity()</code> determines the minimal allocated size of its internal buffer. </p>
<p>The converting constructor of the <code class="computeroutput">capacity_control</code> allows implicit conversion from <code class="computeroutput">size_type</code>-like types which ensures compatibility of creating an instance of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> with other STL containers.</p>
<p>On the other hand the operator <code class="computeroutput">size_type()</code> provides implicit conversion to the <code class="computeroutput">size_type</code> which allows to treat the capacity of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> the same way as in the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html" title="Class template circular_buffer">circular_buffer</a></code>. </p>
</li></ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.7.16.4.3.4.3"></a><h3>
<a name="id4-bb"></a><code class="computeroutput">circular_buffer_space_optimized</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">bool</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1affedf30e9a331120b7935bd43bcd96c9"></a><span class="identifier">full</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>Is the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> full? <p>

</p>
<p><b>Exception Safety. </b>No-throw. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Does not invalidate any iterators. </p>
<p>
</p>
<p><b>Complexity. </b>Constant (in the size of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>). </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1a12c932f15d9028d99dd87ae890e60088">empty()</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p><code class="computeroutput">true</code> if the number of elements stored in the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> equals the capacity of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>; <code class="computeroutput">false</code> otherwise. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>Nothing. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">size_type</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a1235f424313eb295ea327db53a44f66f"></a><span class="identifier">reserve</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>Get the maximum number of elements which can be inserted into the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> without overwriting any of already stored elements. <p>

</p>
<p><b>Exception Safety. </b>No-throw. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Does not invalidate any iterators. </p>
<p>
</p>
<p><b>Complexity. </b>Constant (in the size of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>). </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1af051aec0ffeb9105419cf6292ba80750">size()</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1ac7f5acdb90f95aabcdd81be2a9258dc4">max_size()</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a>.capacity() - <a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1af051aec0ffeb9105419cf6292ba80750">size()</a></code> </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>Nothing. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">const</span> <span class="identifier">capacity_type</span> <span class="special">&amp;</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7"></a><span class="identifier">capacity</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>Get the capacity of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>. <p>

</p>
<p><b>Exception Safety. </b>No-throw. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Does not invalidate any iterators. </p>
<p>
</p>
<p><b>Complexity. </b>Constant (in the size of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>). </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a1235f424313eb295ea327db53a44f66f">reserve()</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1af051aec0ffeb9105419cf6292ba80750">size()</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1ac7f5acdb90f95aabcdd81be2a9258dc4">max_size()</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a49f28bc5b33d2062b9f6a33b48264e3f">set_capacity(const capacity_type&amp;)</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>The capacity controller representing the maximum number of elements which can be stored in the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> and the minimal allocated size of the internal buffer. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>Nothing. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a49f28bc5b33d2062b9f6a33b48264e3f"></a><span class="identifier">set_capacity</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">capacity_type</span> <span class="special">&amp;</span> capacity_ctrl<span class="special">)</span><span class="special">;</span></pre>Change the capacity (and the minimal guaranteed amount of allocated memory) of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>. <p>


</p>
<p><b>Exception Safety. </b>Strong. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in <code class="computeroutput">min[<a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1af051aec0ffeb9105419cf6292ba80750">size()</a>, capacity_ctrl.capacity()]</code>). </p>
<p>
</p>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>To explicitly clear the extra allocated memory use the <span class="bold"><strong>shrink-to-fit</strong></span> technique:<br>
<br>
 <code class="computeroutput">boost::circular_buffer_space_optimized&lt;int&gt; cb(1000);<br>
 ...<br>
 boost::circular_buffer_space_optimized&lt;int&gt;(cb).swap(cb);</code><br>
<br>
 For more information about the shrink-to-fit technique in STL see <a href="http://www.gotw.ca/gotw/054.htm" target="_top">http://www.gotw.ca/gotw/054.htm</a>. </p></td></tr>
</table></div>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a0f096c108ebde69ae83a9de41b3bea56">rset_capacity(const capacity_type&amp;)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1af244ff5576b79f8d60e273c02d71c9f2">resize(size_type, const_reference)</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">capacity_ctrl</code></span></p></td>
<td><p>The new capacity controller. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a> == capacity_ctrl &amp;&amp; <a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1af051aec0ffeb9105419cf6292ba80750">size()</a> &lt;= capacity_ctrl.capacity()</code><br>
<br>
 If the current number of elements stored in the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> is greater than the desired new capacity then number of <code class="computeroutput">[<a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1af051aec0ffeb9105419cf6292ba80750">size()</a> - capacity_ctrl.capacity()]</code> <span class="bold"><strong>last</strong></span> elements will be removed and the new size will be equal to <code class="computeroutput">capacity_ctrl.capacity()</code>.<br>
<br>
 If the current number of elements stored in the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> is lower than the new capacity then the amount of allocated memory in the internal buffer may be accommodated as necessary but it will never drop below <code class="computeroutput">capacity_ctrl.min_capacity()</code>. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted, (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::T(const T&amp;)</code> throws or nothing if <code class="computeroutput">T::T(T&amp;&amp;)</code> is noexcept. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1af244ff5576b79f8d60e273c02d71c9f2"></a><span class="identifier">resize</span><span class="special">(</span><span class="identifier">size_type</span> new_size<span class="special">,</span> <span class="identifier">param_value_type</span> item <span class="special">=</span> <span class="identifier">value_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre>Change the size of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>. <p>


</p>
<p><b>Exception Safety. </b>Basic. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in the new size of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>). </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ad45e2e72d9e3fb42e090ebc47ac8d7ee">rresize(size_type, const_reference)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a49f28bc5b33d2062b9f6a33b48264e3f">set_capacity(const capacity_type&amp;)</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">new_size</code></span></p></td>
<td><p>The new size. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">item</code></span></p></td>
<td><p>The element the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> will be filled with in order to gain the requested size. (See the <span class="emphasis"><em>Effect</em></span>.) </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1af051aec0ffeb9105419cf6292ba80750">size()</a> == new_size &amp;&amp; <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a>.capacity() &gt;= new_size</code><br>
<br>
 If the new size is greater than the current size, copies of <code class="computeroutput">item</code> will be inserted at the <span class="bold"><strong>back</strong></span> of the of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> in order to achieve the desired size. In the case the resulting size exceeds the current capacity the capacity will be set to <code class="computeroutput">new_size</code>.<br>
<br>
 If the current number of elements stored in the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> is greater than the desired new size then number of <code class="computeroutput">[<a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1af051aec0ffeb9105419cf6292ba80750">size()</a> - new_size]</code> <span class="bold"><strong>last</strong></span> elements will be removed. (The capacity will remain unchanged.)<br>
<br>
 The amount of allocated memory in the internal buffer may be accommodated as necessary. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::T(const T&amp;)</code> throws. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a0f096c108ebde69ae83a9de41b3bea56"></a><span class="identifier">rset_capacity</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">capacity_type</span> <span class="special">&amp;</span> capacity_ctrl<span class="special">)</span><span class="special">;</span></pre>Change the capacity (and the minimal guaranteed amount of allocated memory) of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>. <p>


</p>
<p><b>Exception Safety. </b>Strong. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in <code class="computeroutput">min[<a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1af051aec0ffeb9105419cf6292ba80750">size()</a>, capacity_ctrl.capacity()]</code>). </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a49f28bc5b33d2062b9f6a33b48264e3f">set_capacity(const capacity_type&amp;)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ad45e2e72d9e3fb42e090ebc47ac8d7ee">rresize(size_type, const_reference)</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">capacity_ctrl</code></span></p></td>
<td><p>The new capacity controller. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a> == capacity_ctrl &amp;&amp; <a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1af051aec0ffeb9105419cf6292ba80750">size()</a> &lt;= capacity_ctrl</code><br>
<br>
 If the current number of elements stored in the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> is greater than the desired new capacity then number of <code class="computeroutput">[<a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1af051aec0ffeb9105419cf6292ba80750">size()</a> - capacity_ctrl.capacity()]</code> <span class="bold"><strong>first</strong></span> elements will be removed and the new size will be equal to <code class="computeroutput">capacity_ctrl.capacity()</code>.<br>
<br>
 If the current number of elements stored in the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> is lower than the new capacity then the amount of allocated memory in the internal buffer may be accommodated as necessary but it will never drop below <code class="computeroutput">capacity_ctrl.min_capacity()</code>. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::T(const T&amp;)</code> throws or nothing if <code class="computeroutput">T::T(T&amp;&amp;)</code> is noexcept. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ad45e2e72d9e3fb42e090ebc47ac8d7ee"></a><span class="identifier">rresize</span><span class="special">(</span><span class="identifier">size_type</span> new_size<span class="special">,</span> <span class="identifier">param_value_type</span> item <span class="special">=</span> <span class="identifier">value_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre>Change the size of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>. <p>


</p>
<p><b>Exception Safety. </b>Basic. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in the new size of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>). </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1af244ff5576b79f8d60e273c02d71c9f2">resize(size_type, const_reference)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a0f096c108ebde69ae83a9de41b3bea56">rset_capacity(const capacity_type&amp;)</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">new_size</code></span></p></td>
<td><p>The new size. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">item</code></span></p></td>
<td><p>The element the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> will be filled with in order to gain the requested size. (See the <span class="emphasis"><em>Effect</em></span>.) </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1af051aec0ffeb9105419cf6292ba80750">size()</a> == new_size &amp;&amp; <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a>.capacity() &gt;= new_size</code><br>
<br>
 If the new size is greater than the current size, copies of <code class="computeroutput">item</code> will be inserted at the <span class="bold"><strong>front</strong></span> of the of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> in order to achieve the desired size. In the case the resulting size exceeds the current capacity the capacity will be set to <code class="computeroutput">new_size</code>.<br>
<br>
 If the current number of elements stored in the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> is greater than the desired new size then number of <code class="computeroutput">[<a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1af051aec0ffeb9105419cf6292ba80750">size()</a> - new_size]</code> <span class="bold"><strong>first</strong></span> elements will be removed. (The capacity will remain unchanged.)<br>
<br>
 The amount of allocated memory in the internal buffer may be accommodated as necessary. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::T(const T&amp;)</code> throws. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">explicit</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a8077e430e110ee99f5997257f33d0058"></a><span class="identifier">circular_buffer_space_optimized</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">allocator_type</span> <span class="special">&amp;</span> alloc <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>Create an empty space optimized circular buffer with zero capacity. <p>


</p>
<p><b>Complexity. </b>Constant. </p>
<p>
</p>
<div class="warning"><table border="0" summary="Warning">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../../../../doc/src/images/warning.png"></td>
<th align="left">Warning</th>
</tr>
<tr><td align="left" valign="top"><p>Since Boost version 1.36 the behaviour of this constructor has changed. Now it creates a space optimized circular buffer with zero capacity. </p></td></tr>
</table></div>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">alloc</code></span></p></td>
<td><p>The allocator. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a>.capacity() == 0 &amp;&amp; <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a>.min_capacity() == 0 &amp;&amp; <a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1af051aec0ffeb9105419cf6292ba80750">size()</a> == 0</code> </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>Nothing. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">explicit</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a741159a0511a4e0fed6eaab6d6959fa7"></a><span class="identifier">circular_buffer_space_optimized</span><span class="special">(</span><span class="identifier">capacity_type</span> capacity_ctrl<span class="special">,</span> 
                                         <span class="keyword">const</span> <span class="identifier">allocator_type</span> <span class="special">&amp;</span> alloc <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre>Create an empty space optimized circular buffer with the specified capacity. <p>


</p>
<p><b>Complexity. </b>Constant. </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">capacity_ctrl</code></span></p></td>
<td><p>The capacity controller representing the maximum number of elements which can be stored in the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> and the minimal allocated size of the internal buffer. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">alloc</code></span></p></td>
<td><p>The allocator. </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a> == capacity_ctrl &amp;&amp; <a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1af051aec0ffeb9105419cf6292ba80750">size()</a> == 0</code><br>
<br>
 The amount of allocated memory in the internal buffer is <code class="computeroutput">capacity_ctrl.min_capacity()</code>. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1af8c9fa872f9a84d454d7e245cc2eadbd"></a><span class="identifier">circular_buffer_space_optimized</span><span class="special">(</span><span class="identifier">capacity_type</span> capacity_ctrl<span class="special">,</span> 
                                <span class="identifier">param_value_type</span> item<span class="special">,</span> 
                                <span class="keyword">const</span> <span class="identifier">allocator_type</span> <span class="special">&amp;</span> alloc <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre>Create a full space optimized circular buffer with the specified capacity filled with <code class="computeroutput">capacity_ctrl.capacity()</code> copies of <code class="computeroutput">item</code>. <p>


</p>
<p><b>Complexity. </b>Linear (in the <code class="computeroutput">capacity_ctrl.capacity()</code>). </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">capacity_ctrl</code></span></p></td>
<td><p>The capacity controller representing the maximum number of elements which can be stored in the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> and the minimal allocated size of the internal buffer. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">item</code></span></p></td>
<td><p>The element the created <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> will be filled with. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">alloc</code></span></p></td>
<td><p>The allocator. </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a> == capacity_ctrl &amp;&amp; <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1affedf30e9a331120b7935bd43bcd96c9">full()</a> &amp;&amp; (*this)[0] == item &amp;&amp; (*this)[1] == item &amp;&amp; ... &amp;&amp; (*this) [capacity_ctrl.capacity() - 1] == item </code><br>
<br>
 The amount of allocated memory in the internal buffer is <code class="computeroutput">capacity_ctrl.capacity()</code>. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>
<p class="simpara">An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). </p>
<p class="simpara">Whatever <code class="computeroutput">T::T(const T&amp;)</code> throws. </p>
</td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ad29ce80b10d4a3250fedeb9427210d96"></a><span class="identifier">circular_buffer_space_optimized</span><span class="special">(</span><span class="identifier">capacity_type</span> capacity_ctrl<span class="special">,</span> <span class="identifier">size_type</span> n<span class="special">,</span> 
                                <span class="identifier">param_value_type</span> item<span class="special">,</span> 
                                <span class="keyword">const</span> <span class="identifier">allocator_type</span> <span class="special">&amp;</span> alloc <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre>Create a space optimized circular buffer with the specified capacity filled with <code class="computeroutput">n</code> copies of <code class="computeroutput">item</code>. <p>



</p>
<p><b>Complexity. </b>Linear (in the <code class="computeroutput">n</code>). </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">capacity_ctrl</code></span></p></td>
<td><p>The capacity controller representing the maximum number of elements which can be stored in the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> and the minimal allocated size of the internal buffer. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">n</code></span></p></td>
<td><p>The number of elements the created <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> will be filled with. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">item</code></span></p></td>
<td><p>The element the created <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> will be filled with. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">alloc</code></span></p></td>
<td><p>The allocator. </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">capacity_ctrl.capacity() &gt;= n</code> </p></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a> == capacity_ctrl &amp;&amp; <a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1af051aec0ffeb9105419cf6292ba80750">size()</a> == n &amp;&amp; (*this)[0] == item &amp;&amp; (*this)[1] == item &amp;&amp; ... &amp;&amp; (*this)[n - 1] == item</code><br>
<br>
 The amount of allocated memory in the internal buffer is <code class="computeroutput">max[n, capacity_ctrl.min_capacity()]</code>. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::T(const T&amp;)</code> throws. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ad9f273c1a794f84484d220e977a3e24b"></a><span class="identifier">circular_buffer_space_optimized</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span> <span class="special">&amp;</span> cb<span class="special">)</span><span class="special">;</span></pre>The copy constructor. <p>Creates a copy of the specified <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>. 


</p>
<p><b>Complexity. </b>Linear (in the size of <code class="computeroutput">cb</code>). </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">cb</code></span></p></td>
<td><p>The <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> to be copied. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p><code class="computeroutput">*this == cb</code><br>
<br>
 The amount of allocated memory in the internal buffer is <code class="computeroutput">cb.size()</code>. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::T(const T&amp;)</code> throws. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ad0cc9be3b639bf97ba2673a19862a98e"></a><span class="identifier">circular_buffer_space_optimized</span><span class="special">(</span><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span> <span class="special">&amp;&amp;</span> cb<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>The move constructor. <p>Move constructs a <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> from <code class="computeroutput">cb</code>, leaving <code class="computeroutput">cb</code> empty. 



</p>
<p><b>Constant. </b></p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">cb</code></span></p></td>
<td><p><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html" title="Class template circular_buffer">circular_buffer</a></code> to 'steal' value from. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>C++ compiler with rvalue references support. </p></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p><code class="computeroutput">cb.empty()</code> </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>Nothing. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> InputIterator<span class="special">&gt;</span> 
  <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1afa6f32d074d996d367dbe7cd2c614ca2"></a><span class="identifier">circular_buffer_space_optimized</span><span class="special">(</span><span class="identifier">InputIterator</span> first<span class="special">,</span> <span class="identifier">InputIterator</span> last<span class="special">,</span> 
                                  <span class="keyword">const</span> <span class="identifier">allocator_type</span> <span class="special">&amp;</span> alloc <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre>Create a full space optimized circular buffer filled with a copy of the range. <p>



</p>
<p><b>Complexity. </b>Linear (in the <code class="computeroutput">std::distance(first, last)</code>). </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">first</code></span></p></td>
<td><p>The beginning of the range to be copied. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">last</code></span></p></td>
<td><p>The end of the range to be copied. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">alloc</code></span></p></td>
<td><p>The allocator. </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>Valid range <code class="computeroutput">[first, last)</code>.<br>
 <code class="computeroutput">first</code> and <code class="computeroutput">last</code> have to meet the requirements of <a href="https://www.boost.org/sgi/stl/InputIterator.html" target="_top">InputIterator</a>. </p></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a>.capacity() == std::distance(first, last) &amp;&amp; <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a>.min_capacity() == 0 &amp;&amp; <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1affedf30e9a331120b7935bd43bcd96c9">full()</a> &amp;&amp; (*this)[0]== *first &amp;&amp; (*this)[1] == *(first + 1) &amp;&amp; ... &amp;&amp; (*this)[std::distance(first, last) - 1] == *(last - 1)</code><br>
<br>
 The amount of allocated memory in the internal buffer is <code class="computeroutput">std::distance(first, last)</code>. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::T(const T&amp;)</code> throws or nothing if <code class="computeroutput">T::T(T&amp;&amp;)</code> is noexcept and <code class="computeroutput">InputIterator</code> is a move iterator. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> InputIterator<span class="special">&gt;</span> 
  <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a12a2c10a16b69388b782d71130f00625"></a><span class="identifier">circular_buffer_space_optimized</span><span class="special">(</span><span class="identifier">capacity_type</span> capacity_ctrl<span class="special">,</span> 
                                  <span class="identifier">InputIterator</span> first<span class="special">,</span> <span class="identifier">InputIterator</span> last<span class="special">,</span> 
                                  <span class="keyword">const</span> <span class="identifier">allocator_type</span> <span class="special">&amp;</span> alloc <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre>Create a space optimized circular buffer with the specified capacity (and the minimal guaranteed amount of allocated memory) filled with a copy of the range. <p>



</p>
<p><b>Complexity. </b>Linear (in <code class="computeroutput">std::distance(first, last)</code>; in <code class="computeroutput">min[capacity_ctrl.capacity(), std::distance(first, last)]</code> if the <code class="computeroutput">InputIterator</code> is a <a href="https://www.boost.org/sgi/stl/RandomAccessIterator.html" target="_top">RandomAccessIterator</a>). </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">capacity_ctrl</code></span></p></td>
<td><p>The capacity controller representing the maximum number of elements which can be stored in the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> and the minimal allocated size of the internal buffer. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">first</code></span></p></td>
<td><p>The beginning of the range to be copied. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">last</code></span></p></td>
<td><p>The end of the range to be copied. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">alloc</code></span></p></td>
<td><p>The allocator. </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>Valid range <code class="computeroutput">[first, last)</code>.<br>
 <code class="computeroutput">first</code> and <code class="computeroutput">last</code> have to meet the requirements of <a href="https://www.boost.org/sgi/stl/InputIterator.html" target="_top">InputIterator</a>. </p></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a> == capacity_ctrl &amp;&amp; <a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1af051aec0ffeb9105419cf6292ba80750">size()</a> &lt;= std::distance(first, last) &amp;&amp; (*this)[0]== (last - capacity_ctrl.capacity()) &amp;&amp; (*this)[1] == *(last - capacity_ctrl.capacity() + 1) &amp;&amp; ... &amp;&amp; (*this)[capacity_ctrl.capacity() - 1] == *(last - 1)</code><br>
<br>
 If the number of items to be copied from the range <code class="computeroutput">[first, last)</code> is greater than the specified <code class="computeroutput">capacity_ctrl.capacity()</code> then only elements from the range <code class="computeroutput">[last - capacity_ctrl.capacity(), last)</code> will be copied.<br>
<br>
 The amount of allocated memory in the internal buffer is <code class="computeroutput">max[capacity_ctrl.min_capacity(), min[capacity_ctrl.capacity(), std::distance(first, last)]]</code>. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::T(const T&amp;)</code> throws. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span> <span class="special">&amp;</span> 
<a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a72835f782ed2acda4074dff75f198373"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span> <span class="special">&amp;</span> cb<span class="special">)</span><span class="special">;</span></pre>The assign operator. <p>Makes this <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> to become a copy of the specified <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>. 


</p>
<p><b>Exception Safety. </b>Strong. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to this <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in the size of <code class="computeroutput">cb</code>). </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a7ca4fda9526d0dad99706763c3b2d9f1">assign(size_type, const_reference)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a108055ae3f6b1635e1428b0455902cbf">assign(capacity_type, size_type, const_reference)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a14a79fa079775d0c6fefe6ed3bb34d5f">assign(InputIterator, InputIterator)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a7eaa049f1b889de9194cbe6419e90bbd">assign(capacity_type, InputIterator, InputIterator)</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">cb</code></span></p></td>
<td><p>The <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> to be copied. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p><code class="computeroutput">*this == cb</code><br>
<br>
 The amount of allocated memory in the internal buffer is <code class="computeroutput">cb.size()</code>. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>
<p class="simpara">An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). </p>
<p class="simpara">Whatever <code class="computeroutput">T::T(const T&amp;)</code> throws. </p>
</td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span> <span class="special">&amp;</span> 
<a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a86e286b7527809dbd2c6e0449aab4f64"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span> <span class="special">&amp;&amp;</span> cb<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>Move assigns content of <code class="computeroutput">cb</code> to <code class="computeroutput">*this</code>, leaving <code class="computeroutput">cb</code> empty. <p>



</p>
<p><b>Complexity. </b>Constant. </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">cb</code></span></p></td>
<td><p><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html" title="Class template circular_buffer">circular_buffer</a></code> to 'steal' value from. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>C++ compiler with rvalue references support. </p></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p><code class="computeroutput">cb.empty()</code> </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>Nothing. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a7ca4fda9526d0dad99706763c3b2d9f1"></a><span class="identifier">assign</span><span class="special">(</span><span class="identifier">size_type</span> n<span class="special">,</span> <span class="identifier">param_value_type</span> item<span class="special">)</span><span class="special">;</span></pre>Assign <code class="computeroutput">n</code> items into the space optimized circular buffer. <p>The content of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> will be removed and replaced with <code class="computeroutput">n</code> copies of the <code class="computeroutput">item</code>. 


</p>
<p><b>Exception Safety. </b>Basic. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in the <code class="computeroutput">n</code>). </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a72835f782ed2acda4074dff75f198373">operator=</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a108055ae3f6b1635e1428b0455902cbf">assign(capacity_type, size_type, const_reference)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a14a79fa079775d0c6fefe6ed3bb34d5f">assign(InputIterator, InputIterator)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a7eaa049f1b889de9194cbe6419e90bbd">assign(capacity_type, InputIterator, InputIterator)</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">n</code></span></p></td>
<td><p>The number of elements the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> will be filled with. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">item</code></span></p></td>
<td><p>The element the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> will be filled with. </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a>.capacity() == n &amp;&amp; <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a>.min_capacity() == 0 &amp;&amp; <a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1af051aec0ffeb9105419cf6292ba80750">size()</a> == n &amp;&amp; (*this)[0] == item &amp;&amp; (*this)[1] == item &amp;&amp; ... &amp;&amp; (*this) [n - 1] == item</code><br>
<br>
 The amount of allocated memory in the internal buffer is <code class="computeroutput">n</code>. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::T(const T&amp;)</code> throws. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a108055ae3f6b1635e1428b0455902cbf"></a><span class="identifier">assign</span><span class="special">(</span><span class="identifier">capacity_type</span> capacity_ctrl<span class="special">,</span> <span class="identifier">size_type</span> n<span class="special">,</span> <span class="identifier">param_value_type</span> item<span class="special">)</span><span class="special">;</span></pre>Assign <code class="computeroutput">n</code> items into the space optimized circular buffer specifying the capacity. <p>The capacity of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> will be set to the specified value and the content of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> will be removed and replaced with <code class="computeroutput">n</code> copies of the <code class="computeroutput">item</code>. 



</p>
<p><b>Exception Safety. </b>Basic. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in the <code class="computeroutput">n</code>). </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a72835f782ed2acda4074dff75f198373">operator=</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a7ca4fda9526d0dad99706763c3b2d9f1">assign(size_type, const_reference)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a14a79fa079775d0c6fefe6ed3bb34d5f">assign(InputIterator, InputIterator)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a7eaa049f1b889de9194cbe6419e90bbd">assign(capacity_type, InputIterator, InputIterator)</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">capacity_ctrl</code></span></p></td>
<td><p>The new capacity controller. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">n</code></span></p></td>
<td><p>The number of elements the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> will be filled with. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">item</code></span></p></td>
<td><p>The element the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> will be filled with. </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">capacity_ctrl.capacity() &gt;= n</code> </p></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a> == capacity_ctrl &amp;&amp; <a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1af051aec0ffeb9105419cf6292ba80750">size()</a> == n &amp;&amp; (*this)[0] == item &amp;&amp; (*this)[1] == item &amp;&amp; ... &amp;&amp; (*this) [n - 1] == item </code><br>
<br>
 The amount of allocated memory will be <code class="computeroutput">max[n, capacity_ctrl.min_capacity()]</code>. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::T(const T&amp;)</code> throws. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> InputIterator<span class="special">&gt;</span> 
  <span class="keyword">void</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a14a79fa079775d0c6fefe6ed3bb34d5f"></a><span class="identifier">assign</span><span class="special">(</span><span class="identifier">InputIterator</span> first<span class="special">,</span> <span class="identifier">InputIterator</span> last<span class="special">)</span><span class="special">;</span></pre>Assign a copy of the range into the space optimized circular buffer. <p>The content of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> will be removed and replaced with copies of elements from the specified range. 



</p>
<p><b>Exception Safety. </b>Basic. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in the <code class="computeroutput">std::distance(first, last)</code>). </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a72835f782ed2acda4074dff75f198373">operator=</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a7ca4fda9526d0dad99706763c3b2d9f1">assign(size_type, const_reference)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a108055ae3f6b1635e1428b0455902cbf">assign(capacity_type, size_type, const_reference)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a7eaa049f1b889de9194cbe6419e90bbd">assign(capacity_type, InputIterator, InputIterator)</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">first</code></span></p></td>
<td><p>The beginning of the range to be copied. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">last</code></span></p></td>
<td><p>The end of the range to be copied. </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>Valid range <code class="computeroutput">[first, last)</code>.<br>
 <code class="computeroutput">first</code> and <code class="computeroutput">last</code> have to meet the requirements of <a href="https://www.boost.org/sgi/stl/InputIterator.html" target="_top">InputIterator</a>. </p></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a>.capacity() == std::distance(first, last) &amp;&amp; <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a>.min_capacity() == 0 &amp;&amp; <a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1af051aec0ffeb9105419cf6292ba80750">size()</a> == std::distance(first, last) &amp;&amp; (*this)[0]== *first &amp;&amp; (*this)[1] == *(first + 1) &amp;&amp; ... &amp;&amp; (*this)[std::distance(first, last) - 1] == *(last - 1)</code><br>
<br>
 The amount of allocated memory in the internal buffer is <code class="computeroutput">std::distance(first, last)</code>. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::T(const T&amp;)</code> throws or nothing if <code class="computeroutput">T::T(T&amp;&amp;)</code> is noexcept and <code class="computeroutput">InputIterator</code> is a move iterator. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> InputIterator<span class="special">&gt;</span> 
  <span class="keyword">void</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a7eaa049f1b889de9194cbe6419e90bbd"></a><span class="identifier">assign</span><span class="special">(</span><span class="identifier">capacity_type</span> capacity_ctrl<span class="special">,</span> <span class="identifier">InputIterator</span> first<span class="special">,</span> 
              <span class="identifier">InputIterator</span> last<span class="special">)</span><span class="special">;</span></pre>Assign a copy of the range into the space optimized circular buffer specifying the capacity. <p>The capacity of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> will be set to the specified value and the content of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> will be removed and replaced with copies of elements from the specified range. 



</p>
<p><b>Exception Safety. </b>Basic. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in <code class="computeroutput">std::distance(first, last)</code>; in <code class="computeroutput">min[capacity_ctrl.capacity(), std::distance(first, last)]</code> if the <code class="computeroutput">InputIterator</code> is a <a href="https://www.boost.org/sgi/stl/RandomAccessIterator.html" target="_top">RandomAccessIterator</a>). </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a72835f782ed2acda4074dff75f198373">operator=</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a7ca4fda9526d0dad99706763c3b2d9f1">assign(size_type, const_reference)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a108055ae3f6b1635e1428b0455902cbf">assign(capacity_type, size_type, const_reference)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a14a79fa079775d0c6fefe6ed3bb34d5f">assign(InputIterator, InputIterator)</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">capacity_ctrl</code></span></p></td>
<td><p>The new capacity controller. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">first</code></span></p></td>
<td><p>The beginning of the range to be copied. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">last</code></span></p></td>
<td><p>The end of the range to be copied. </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>Valid range <code class="computeroutput">[first, last)</code>.<br>
 <code class="computeroutput">first</code> and <code class="computeroutput">last</code> have to meet the requirements of <a href="https://www.boost.org/sgi/stl/InputIterator.html" target="_top">InputIterator</a>. </p></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a> == capacity_ctrl &amp;&amp; <a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1af051aec0ffeb9105419cf6292ba80750">size()</a> &lt;= std::distance(first, last) &amp;&amp; (*this)[0]== *(last - capacity) &amp;&amp; (*this)[1] == *(last - capacity + 1) &amp;&amp; ... &amp;&amp; (*this)[capacity - 1] == *(last - 1)</code><br>
<br>
 If the number of items to be copied from the range <code class="computeroutput">[first, last)</code> is greater than the specified <code class="computeroutput">capacity</code> then only elements from the range <code class="computeroutput">[last - capacity, last)</code> will be copied.<br>
<br>
 The amount of allocated memory in the internal buffer is <code class="computeroutput">max[std::distance(first, last), capacity_ctrl.min_capacity()]</code>. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::T(const T&amp;)</code> throws or nothing if <code class="computeroutput">T::T(T&amp;&amp;)</code> is noexcept and <code class="computeroutput">InputIterator</code> is a move iterator. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a4445d7daeeca1945880d45183217d53a"></a><span class="identifier">swap</span><span class="special">(</span><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span> <span class="special">&amp;</span> cb<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>Swap the contents of two space-optimized circular-buffers. <p>


</p>
<p><b>Exception Safety. </b>No-throw. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators of both <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> containers. (On the other hand the iterators still point to the same elements but within another container. If you want to rely on this feature you have to turn the __debug_support off, otherwise an assertion will report an error if such invalidated iterator is used.) </p>
<p>
</p>
<p><b>Complexity. </b>Constant (in the size of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>). </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput">swap(circular_buffer&lt;T, Alloc&gt;&amp;, circular_buffer&lt;T, Alloc&gt;&amp;)</code>, <code class="computeroutput">swap(circular_buffer_space_optimized&lt;T, Alloc&gt;&amp;, circular_buffer_space_optimized&lt;T, Alloc&gt;&amp;)</code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">cb</code></span></p></td>
<td><p>The <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> whose content will be swapped. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p><code class="computeroutput">this</code> contains elements of <code class="computeroutput">cb</code> and vice versa; the capacity and the amount of allocated memory in the internal buffer of <code class="computeroutput">this</code> equal to the capacity and the amount of allocated memory of <code class="computeroutput">cb</code> and vice versa. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>Nothing. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a741062e21307061dc8d75e9189c0f592"></a><span class="identifier">push_back</span><span class="special">(</span><span class="identifier">param_value_type</span> item<span class="special">)</span><span class="special">;</span></pre>Insert a new element at the end of the space optimized circular buffer. <p>


</p>
<p><b>Exception Safety. </b>Basic. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in the size of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>). </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a05fc4b8702090590a2444745f7e1fd35">push_front(const_reference)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a9c4290c18ab3dd2462dc01fb8368dff6">pop_back()</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ad7d496c40fc053258ac7d19cf5261788">pop_front()</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">item</code></span></p></td>
<td><p>The element to be inserted. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p>if <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a>.capacity() &gt; 0</code> then <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1ad985d974020f88bb4255d8edbae0a30a">back()</a> == item</code><br>
 If the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> is full, the first element will be removed. If the capacity is <code class="computeroutput">0</code>, nothing will be inserted.<br>
<br>
 The amount of allocated memory in the internal buffer may be predictively increased. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::T(const T&amp;)</code> throws. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a43136bdd6c7a7856e2e6b09c87a4e451"></a><span class="identifier">push_back</span><span class="special">(</span><span class="identifier">rvalue_type</span> item<span class="special">)</span><span class="special">;</span></pre>Insert a new element at the end of the space optimized circular buffer. <p>


</p>
<p><b>Exception Safety. </b>Basic. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in the size of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>). </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a05fc4b8702090590a2444745f7e1fd35">push_front(const_reference)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a9c4290c18ab3dd2462dc01fb8368dff6">pop_back()</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ad7d496c40fc053258ac7d19cf5261788">pop_front()</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">item</code></span></p></td>
<td><p>The element to be inserted. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p>if <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a>.capacity() &gt; 0</code> then <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1ad985d974020f88bb4255d8edbae0a30a">back()</a> == item</code><br>
 If the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> is full, the first element will be removed. If the capacity is <code class="computeroutput">0</code>, nothing will be inserted.<br>
<br>
 The amount of allocated memory in the internal buffer may be predictively increased. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1acb45532bece8fb04940e38005be341a8"></a><span class="identifier">push_back</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>Insert a new element at the end of the space optimized circular buffer. <p>

</p>
<p><b>Exception Safety. </b>Basic. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in the size of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>). </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a05fc4b8702090590a2444745f7e1fd35">push_front(const_reference)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a9c4290c18ab3dd2462dc01fb8368dff6">pop_back()</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ad7d496c40fc053258ac7d19cf5261788">pop_front()</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p>if <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a>.capacity() &gt; 0</code> then <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1ad985d974020f88bb4255d8edbae0a30a">back()</a> == item</code><br>
 If the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> is full, the first element will be removed. If the capacity is <code class="computeroutput">0</code>, nothing will be inserted.<br>
<br>
 The amount of allocated memory in the internal buffer may be predictively increased. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::T()</code> throws. Whatever <code class="computeroutput">T::T(const T&amp;)</code> throws or nothing if <code class="computeroutput">T::T(T&amp;&amp;)</code> is noexcept. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1acd85b7f08f1d7b99c40b898cff5116d4"></a><span class="identifier">push_front</span><span class="special">(</span><span class="identifier">param_value_type</span> item<span class="special">)</span><span class="special">;</span></pre>Insert a new element at the beginning of the space optimized circular buffer. <p>


</p>
<p><b>Exception Safety. </b>Basic. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in the size of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>). </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1acb45532bece8fb04940e38005be341a8">push_back(const_reference)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a9c4290c18ab3dd2462dc01fb8368dff6">pop_back()</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ad7d496c40fc053258ac7d19cf5261788">pop_front()</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">item</code></span></p></td>
<td><p>The element to be inserted. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p>if <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a>.capacity() &gt; 0</code> then <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1a0d5fdeabeb352f47d1f7bb1ea8d9819f">front()</a> == item</code><br>
 If the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> is full, the last element will be removed. If the capacity is <code class="computeroutput">0</code>, nothing will be inserted.<br>
<br>
 The amount of allocated memory in the internal buffer may be predictively increased. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::T(const T&amp;)</code> throws. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a03d43a8671be070303083a954f172dad"></a><span class="identifier">push_front</span><span class="special">(</span><span class="identifier">rvalue_type</span> item<span class="special">)</span><span class="special">;</span></pre>Insert a new element at the beginning of the space optimized circular buffer. <p>


</p>
<p><b>Exception Safety. </b>Basic. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in the size of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>). </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1acb45532bece8fb04940e38005be341a8">push_back(const_reference)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a9c4290c18ab3dd2462dc01fb8368dff6">pop_back()</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ad7d496c40fc053258ac7d19cf5261788">pop_front()</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">item</code></span></p></td>
<td><p>The element to be inserted. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p>if <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a>.capacity() &gt; 0</code> then <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1a0d5fdeabeb352f47d1f7bb1ea8d9819f">front()</a> == item</code><br>
 If the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> is full, the last element will be removed. If the capacity is <code class="computeroutput">0</code>, nothing will be inserted.<br>
<br>
 The amount of allocated memory in the internal buffer may be predictively increased. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::T(const T&amp;)</code> throws or nothing if <code class="computeroutput">T::T(T&amp;&amp;)</code> is noexcept. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a05fc4b8702090590a2444745f7e1fd35"></a><span class="identifier">push_front</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>Insert a new element at the beginning of the space optimized circular buffer. <p>

</p>
<p><b>Exception Safety. </b>Basic. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in the size of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>). </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1acb45532bece8fb04940e38005be341a8">push_back(const_reference)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a9c4290c18ab3dd2462dc01fb8368dff6">pop_back()</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ad7d496c40fc053258ac7d19cf5261788">pop_front()</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p>if <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a>.capacity() &gt; 0</code> then <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1a0d5fdeabeb352f47d1f7bb1ea8d9819f">front()</a> == item</code><br>
 If the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> is full, the last element will be removed. If the capacity is <code class="computeroutput">0</code>, nothing will be inserted.<br>
<br>
 The amount of allocated memory in the internal buffer may be predictively increased. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::T()</code> throws. Whatever <code class="computeroutput">T::T(const T&amp;)</code> throws or nothing if <code class="computeroutput">T::T(T&amp;&amp;)</code> is noexcept. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a9c4290c18ab3dd2462dc01fb8368dff6"></a><span class="identifier">pop_back</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>Remove the last element from the space optimized circular buffer. <p>


</p>
<p><b>Exception Safety. </b>Basic. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in the size of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>). </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ad7d496c40fc053258ac7d19cf5261788">pop_front()</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1acb45532bece8fb04940e38005be341a8">push_back(const_reference)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a05fc4b8702090590a2444745f7e1fd35">push_front(const_reference)</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">!empty()</code> </p></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p>The last element is removed from the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>.<br>
<br>
 The amount of allocated memory in the internal buffer may be predictively decreased. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ad7d496c40fc053258ac7d19cf5261788"></a><span class="identifier">pop_front</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>Remove the first element from the space optimized circular buffer. <p>


</p>
<p><b>Exception Safety. </b>Basic. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in the size of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>). </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a9c4290c18ab3dd2462dc01fb8368dff6">pop_back()</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1acb45532bece8fb04940e38005be341a8">push_back(const_reference)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a05fc4b8702090590a2444745f7e1fd35">push_front(const_reference)</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">!empty()</code> </p></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p>The first element is removed from the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>.<br>
<br>
 The amount of allocated memory in the internal buffer may be predictively decreased. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">iterator</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ab4a56a420d75236091bdeddb1b1224aa"></a><span class="identifier">insert</span><span class="special">(</span><span class="identifier">iterator</span> pos<span class="special">,</span> <span class="identifier">param_value_type</span> item<span class="special">)</span><span class="special">;</span></pre>Insert an element at the specified position. <p>




</p>
<p><b>Exception Safety. </b>Basic. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in the size of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>). </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1adc2060ce1105d80429ff3f004ca0691b">insert(iterator, size_type, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1aa981fae21385a0210ea69ce4a4cb7b92">insert(iterator, InputIterator, InputIterator)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1affdfa9cdfa6f42ff67d8b463bc5af1f2">rinsert(iterator, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a1eff7ec0eb603d489bd12f8c48928c9d">rinsert(iterator, size_type, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a689b81ea66407b95a20726a141feb54c">rinsert(iterator, InputIterator, InputIterator)</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">pos</code></span></p></td>
<td><p>An iterator specifying the position where the <code class="computeroutput">item</code> will be inserted. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">item</code></span></p></td>
<td><p>The element to be inserted. </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">pos</code> is a valid iterator pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> or its end. </p></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p>The <code class="computeroutput">item</code> will be inserted at the position <code class="computeroutput">pos</code>.<br>
 If the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> is full, the first element will be overwritten. If the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> is full and the <code class="computeroutput">pos</code> points to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1a3bf9f4a79d86ec4e2d79e98691364f11">begin()</a></code>, then the <code class="computeroutput">item</code> will not be inserted. If the capacity is <code class="computeroutput">0</code>, nothing will be inserted.<br>
<br>
 The amount of allocated memory in the internal buffer may be predictively increased. </p></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>Iterator to the inserted element or <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1a3bf9f4a79d86ec4e2d79e98691364f11">begin()</a></code> if the <code class="computeroutput">item</code> is not inserted. (See the <span class="emphasis"><em>Effect</em></span>.) </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::T(const T&amp;)</code> throws. Whatever <code class="computeroutput">T::operator = (const T&amp;)</code> throws. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">iterator</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ac05b6756df1a0c5514a70453cd9b551b"></a><span class="identifier">insert</span><span class="special">(</span><span class="identifier">iterator</span> pos<span class="special">,</span> <span class="identifier">rvalue_type</span> item<span class="special">)</span><span class="special">;</span></pre>Insert an element at the specified position. <p>




</p>
<p><b>Exception Safety. </b>Basic. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in the size of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>). </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1adc2060ce1105d80429ff3f004ca0691b">insert(iterator, size_type, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1aa981fae21385a0210ea69ce4a4cb7b92">insert(iterator, InputIterator, InputIterator)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1affdfa9cdfa6f42ff67d8b463bc5af1f2">rinsert(iterator, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a1eff7ec0eb603d489bd12f8c48928c9d">rinsert(iterator, size_type, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a689b81ea66407b95a20726a141feb54c">rinsert(iterator, InputIterator, InputIterator)</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">pos</code></span></p></td>
<td><p>An iterator specifying the position where the <code class="computeroutput">item</code> will be inserted. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">item</code></span></p></td>
<td><p>The element to be inserted. </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">pos</code> is a valid iterator pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> or its end. </p></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p>The <code class="computeroutput">item</code> will be inserted at the position <code class="computeroutput">pos</code>.<br>
 If the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> is full, the first element will be overwritten. If the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> is full and the <code class="computeroutput">pos</code> points to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1a3bf9f4a79d86ec4e2d79e98691364f11">begin()</a></code>, then the <code class="computeroutput">item</code> will not be inserted. If the capacity is <code class="computeroutput">0</code>, nothing will be inserted.<br>
<br>
 The amount of allocated memory in the internal buffer may be predictively increased. </p></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>Iterator to the inserted element or <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1a3bf9f4a79d86ec4e2d79e98691364f11">begin()</a></code> if the <code class="computeroutput">item</code> is not inserted. (See the <span class="emphasis"><em>Effect</em></span>.) </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::T(const T&amp;)</code> throws or nothing if <code class="computeroutput">T::T(T&amp;&amp;)</code> is noexcept. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">iterator</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a8e4ffef2a8d965f75c2a85dacbc3c327"></a><span class="identifier">insert</span><span class="special">(</span><span class="identifier">iterator</span> pos<span class="special">)</span><span class="special">;</span></pre>Insert an element at the specified position. <p>




</p>
<p><b>Exception Safety. </b>Basic. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in the size of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>). </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1adc2060ce1105d80429ff3f004ca0691b">insert(iterator, size_type, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1aa981fae21385a0210ea69ce4a4cb7b92">insert(iterator, InputIterator, InputIterator)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1affdfa9cdfa6f42ff67d8b463bc5af1f2">rinsert(iterator, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a1eff7ec0eb603d489bd12f8c48928c9d">rinsert(iterator, size_type, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a689b81ea66407b95a20726a141feb54c">rinsert(iterator, InputIterator, InputIterator)</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">pos</code></span></p></td>
<td><p>An iterator specifying the position where the <code class="computeroutput">item</code> will be inserted. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">pos</code> is a valid iterator pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> or its end. </p></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p>The <code class="computeroutput">item</code> will be inserted at the position <code class="computeroutput">pos</code>.<br>
 If the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> is full, the first element will be overwritten. If the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> is full and the <code class="computeroutput">pos</code> points to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1a3bf9f4a79d86ec4e2d79e98691364f11">begin()</a></code>, then the <code class="computeroutput">item</code> will not be inserted. If the capacity is <code class="computeroutput">0</code>, nothing will be inserted.<br>
<br>
 The amount of allocated memory in the internal buffer may be predictively increased. </p></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>Iterator to the inserted element or <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1a3bf9f4a79d86ec4e2d79e98691364f11">begin()</a></code> if the <code class="computeroutput">item</code> is not inserted. (See the <span class="emphasis"><em>Effect</em></span>.) </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::T()</code> throws. Whatever <code class="computeroutput">T::T(const T&amp;)</code> throws or nothing if <code class="computeroutput">T::T(T&amp;&amp;)</code> is noexcept. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1adc2060ce1105d80429ff3f004ca0691b"></a><span class="identifier">insert</span><span class="special">(</span><span class="identifier">iterator</span> pos<span class="special">,</span> <span class="identifier">size_type</span> n<span class="special">,</span> <span class="identifier">param_value_type</span> item<span class="special">)</span><span class="special">;</span></pre>Insert <code class="computeroutput">n</code> copies of the <code class="computeroutput">item</code> at the specified position. <p>



</p>
<p><b>Exception Safety. </b>Basic. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in <code class="computeroutput">min[<a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a>.capacity(), <a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1af051aec0ffeb9105419cf6292ba80750">size()</a> + n]</code>). </p>
<p>
</p>
<p><b>Example. </b>Consider a <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> with the capacity of 6 and the size of 4. Its internal buffer may look like the one below.<br>
<br>
 <code class="computeroutput">|1|2|3|4| | |</code><br>
 <code class="computeroutput">p ___^</code><br>
<br>
After inserting 5 elements at the position <code class="computeroutput">p</code>:<br>
<br>
 <code class="computeroutput">insert(p, (size_t)5, 0);</code><br>
<br>
actually only 4 elements get inserted and elements <code class="computeroutput">1</code> and <code class="computeroutput">2</code> are overwritten. This is due to the fact the insert operation preserves the capacity. After insertion the internal buffer looks like this:<br>
<br>
<code class="computeroutput">|0|0|0|0|3|4|</code><br>
 <br>
For comparison if the capacity would not be preserved the internal buffer would then result in <code class="computeroutput">|1|2|0|0|0|0|0|3|4|</code>. </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ab4a56a420d75236091bdeddb1b1224aa">insert(iterator, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1aa981fae21385a0210ea69ce4a4cb7b92">insert(iterator, InputIterator, InputIterator)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1affdfa9cdfa6f42ff67d8b463bc5af1f2">rinsert(iterator, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a1eff7ec0eb603d489bd12f8c48928c9d">rinsert(iterator, size_type, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a689b81ea66407b95a20726a141feb54c">rinsert(iterator, InputIterator, InputIterator)</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">pos</code></span></p></td>
<td><p>An iterator specifying the position where the <code class="computeroutput">item</code>s will be inserted. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">n</code></span></p></td>
<td><p>The number of <code class="computeroutput">item</code>s the to be inserted. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">item</code></span></p></td>
<td><p>The element whose copies will be inserted. </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">pos</code> is a valid iterator pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> or its end. </p></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p>The number of <code class="computeroutput">min[n, (pos - <a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1a3bf9f4a79d86ec4e2d79e98691364f11">begin()</a>) + <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a1235f424313eb295ea327db53a44f66f">reserve()</a>]</code> elements will be inserted at the position <code class="computeroutput">pos</code>.<br>
The number of <code class="computeroutput">min[pos - <a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1a3bf9f4a79d86ec4e2d79e98691364f11">begin()</a>, max[0, n - <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a1235f424313eb295ea327db53a44f66f">reserve()</a>]]</code> elements will be overwritten at the beginning of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>.<br>
(See <span class="emphasis"><em>Example</em></span> for the explanation.)<br>
<br>
 The amount of allocated memory in the internal buffer may be predictively increased. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::T(const T&amp;)</code> throws. Whatever <code class="computeroutput">T::operator = (const T&amp;)</code> throws. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> InputIterator<span class="special">&gt;</span> 
  <span class="keyword">void</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1aa981fae21385a0210ea69ce4a4cb7b92"></a><span class="identifier">insert</span><span class="special">(</span><span class="identifier">iterator</span> pos<span class="special">,</span> <span class="identifier">InputIterator</span> first<span class="special">,</span> <span class="identifier">InputIterator</span> last<span class="special">)</span><span class="special">;</span></pre>Insert the range <code class="computeroutput">[first, last)</code> at the specified position. <p>



</p>
<p><b>Exception Safety. </b>Basic. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in <code class="computeroutput">[<a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1af051aec0ffeb9105419cf6292ba80750">size()</a> + std::distance(first, last)]</code>; in <code class="computeroutput">min[<a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a>.capacity(), <a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1af051aec0ffeb9105419cf6292ba80750">size()</a> + std::distance(first, last)]</code> if the <code class="computeroutput">InputIterator</code> is a <a href="https://www.boost.org/sgi/stl/RandomAccessIterator.html" target="_top">RandomAccessIterator</a>). </p>
<p>
</p>
<p><b>Example. </b>Consider a <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> with the capacity of 6 and the size of 4. Its internal buffer may look like the one below.<br>
<br>
 <code class="computeroutput">|1|2|3|4| | |</code><br>
 <code class="computeroutput">p ___^</code><br>
<br>
After inserting a range of elements at the position <code class="computeroutput">p</code>:<br>
<br>
 <code class="computeroutput">int array[] = { 5, 6, 7, 8, 9 };</code><br>
<code class="computeroutput">insert(p, array, array + 5);</code><br>
<br>
 actually only elements <code class="computeroutput">6</code>, <code class="computeroutput">7</code>, <code class="computeroutput">8</code> and <code class="computeroutput">9</code> from the specified range get inserted and elements <code class="computeroutput">1</code> and <code class="computeroutput">2</code> are overwritten. This is due to the fact the insert operation preserves the capacity. After insertion the internal buffer looks like this:<br>
<br>
<code class="computeroutput">|6|7|8|9|3|4|</code><br>
<br>
For comparison if the capacity would not be preserved the internal buffer would then result in <code class="computeroutput">|1|2|5|6|7|8|9|3|4|</code>. </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ab4a56a420d75236091bdeddb1b1224aa">insert(iterator, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1adc2060ce1105d80429ff3f004ca0691b">insert(iterator, size_type, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1affdfa9cdfa6f42ff67d8b463bc5af1f2">rinsert(iterator, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a1eff7ec0eb603d489bd12f8c48928c9d">rinsert(iterator, size_type, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a689b81ea66407b95a20726a141feb54c">rinsert(iterator, InputIterator, InputIterator)</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">pos</code></span></p></td>
<td><p>An iterator specifying the position where the range will be inserted. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">first</code></span></p></td>
<td><p>The beginning of the range to be inserted. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">last</code></span></p></td>
<td><p>The end of the range to be inserted. </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">pos</code> is a valid iterator pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> or its end.<br>
Valid range <code class="computeroutput">[first, last)</code> where <code class="computeroutput">first</code> and <code class="computeroutput">last</code> meet the requirements of an <a href="https://www.boost.org/sgi/stl/InputIterator.html" target="_top">InputIterator</a>. </p></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p>Elements from the range <code class="computeroutput">[first + max[0, distance(first, last) - (pos - <a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1a3bf9f4a79d86ec4e2d79e98691364f11">begin()</a>) - <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a1235f424313eb295ea327db53a44f66f">reserve()</a>], last)</code> will be inserted at the position <code class="computeroutput">pos</code>.<br>
The number of <code class="computeroutput">min[pos - <a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1a3bf9f4a79d86ec4e2d79e98691364f11">begin()</a>, max[0, distance(first, last) - <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a1235f424313eb295ea327db53a44f66f">reserve()</a>]]</code> elements will be overwritten at the beginning of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>.<br>
(See <span class="emphasis"><em>Example</em></span> for the explanation.)<br>
<br>
 The amount of allocated memory in the internal buffer may be predictively increased. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::T(const T&amp;)</code> throws or nothing if <code class="computeroutput">T::T(T&amp;&amp;)</code> is noexcept. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">iterator</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1affdfa9cdfa6f42ff67d8b463bc5af1f2"></a><span class="identifier">rinsert</span><span class="special">(</span><span class="identifier">iterator</span> pos<span class="special">,</span> <span class="identifier">param_value_type</span> item<span class="special">)</span><span class="special">;</span></pre>Insert an element before the specified position. <p>




</p>
<p><b>Exception Safety. </b>Basic. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in the size of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>). </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a1eff7ec0eb603d489bd12f8c48928c9d">rinsert(iterator, size_type, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a689b81ea66407b95a20726a141feb54c">rinsert(iterator, InputIterator, InputIterator)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ab4a56a420d75236091bdeddb1b1224aa">insert(iterator, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1adc2060ce1105d80429ff3f004ca0691b">insert(iterator, size_type, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1aa981fae21385a0210ea69ce4a4cb7b92">insert(iterator, InputIterator, InputIterator)</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">pos</code></span></p></td>
<td><p>An iterator specifying the position before which the <code class="computeroutput">item</code> will be inserted. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">item</code></span></p></td>
<td><p>The element to be inserted. </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">pos</code> is a valid iterator pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> or its end. </p></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p>The <code class="computeroutput">item</code> will be inserted before the position <code class="computeroutput">pos</code>.<br>
 If the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> is full, the last element will be overwritten. If the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> is full and the <code class="computeroutput">pos</code> points to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>, then the <code class="computeroutput">item</code> will not be inserted. If the capacity is <code class="computeroutput">0</code>, nothing will be inserted.<br>
<br>
 The amount of allocated memory in the internal buffer may be predictively increased. </p></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>Iterator to the inserted element or <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code> if the <code class="computeroutput">item</code> is not inserted. (See the <span class="emphasis"><em>Effect</em></span>.) </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::T(const T&amp;)</code> throws. Whatever <code class="computeroutput">T::operator = (const T&amp;)</code> throws. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">iterator</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a6b226205a56f026c7321acecf622f2e3"></a><span class="identifier">rinsert</span><span class="special">(</span><span class="identifier">iterator</span> pos<span class="special">,</span> <span class="identifier">rvalue_type</span> item<span class="special">)</span><span class="special">;</span></pre>Insert an element before the specified position. <p>




</p>
<p><b>Exception Safety. </b>Basic. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in the size of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>). </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a1eff7ec0eb603d489bd12f8c48928c9d">rinsert(iterator, size_type, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a689b81ea66407b95a20726a141feb54c">rinsert(iterator, InputIterator, InputIterator)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ab4a56a420d75236091bdeddb1b1224aa">insert(iterator, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1adc2060ce1105d80429ff3f004ca0691b">insert(iterator, size_type, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1aa981fae21385a0210ea69ce4a4cb7b92">insert(iterator, InputIterator, InputIterator)</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">pos</code></span></p></td>
<td><p>An iterator specifying the position before which the <code class="computeroutput">item</code> will be inserted. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">item</code></span></p></td>
<td><p>The element to be inserted. </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">pos</code> is a valid iterator pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> or its end. </p></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p>The <code class="computeroutput">item</code> will be inserted before the position <code class="computeroutput">pos</code>.<br>
 If the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> is full, the last element will be overwritten. If the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> is full and the <code class="computeroutput">pos</code> points to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>, then the <code class="computeroutput">item</code> will not be inserted. If the capacity is <code class="computeroutput">0</code>, nothing will be inserted.<br>
<br>
 The amount of allocated memory in the internal buffer may be predictively increased. </p></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>Iterator to the inserted element or <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code> if the <code class="computeroutput">item</code> is not inserted. (See the <span class="emphasis"><em>Effect</em></span>.) </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::T(const T&amp;)</code> throws or nothing if <code class="computeroutput">T::T(T&amp;&amp;)</code> is noexcept. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">iterator</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a55d78f0c560014f7b38776a24e832c3e"></a><span class="identifier">rinsert</span><span class="special">(</span><span class="identifier">iterator</span> pos<span class="special">)</span><span class="special">;</span></pre>Insert an element before the specified position. <p>




</p>
<p><b>Exception Safety. </b>Basic. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in the size of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>). </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a1eff7ec0eb603d489bd12f8c48928c9d">rinsert(iterator, size_type, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a689b81ea66407b95a20726a141feb54c">rinsert(iterator, InputIterator, InputIterator)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ab4a56a420d75236091bdeddb1b1224aa">insert(iterator, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1adc2060ce1105d80429ff3f004ca0691b">insert(iterator, size_type, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1aa981fae21385a0210ea69ce4a4cb7b92">insert(iterator, InputIterator, InputIterator)</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">pos</code></span></p></td>
<td><p>An iterator specifying the position before which the <code class="computeroutput">item</code> will be inserted. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">pos</code> is a valid iterator pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> or its end. </p></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p>The <code class="computeroutput">item</code> will be inserted before the position <code class="computeroutput">pos</code>.<br>
 If the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> is full, the last element will be overwritten. If the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> is full and the <code class="computeroutput">pos</code> points to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>, then the <code class="computeroutput">item</code> will not be inserted. If the capacity is <code class="computeroutput">0</code>, nothing will be inserted.<br>
<br>
 The amount of allocated memory in the internal buffer may be predictively increased. </p></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>Iterator to the inserted element or <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code> if the <code class="computeroutput">item</code> is not inserted. (See the <span class="emphasis"><em>Effect</em></span>.) </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::T()</code> throws. Whatever <code class="computeroutput">T::T(const T&amp;)</code> throws or nothing if <code class="computeroutput">T::T(T&amp;&amp;)</code> is noexcept. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a1eff7ec0eb603d489bd12f8c48928c9d"></a><span class="identifier">rinsert</span><span class="special">(</span><span class="identifier">iterator</span> pos<span class="special">,</span> <span class="identifier">size_type</span> n<span class="special">,</span> <span class="identifier">param_value_type</span> item<span class="special">)</span><span class="special">;</span></pre>Insert <code class="computeroutput">n</code> copies of the <code class="computeroutput">item</code> before the specified position. <p>



</p>
<p><b>Exception Safety. </b>Basic. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in <code class="computeroutput">min[<a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a>.capacity(), <a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1af051aec0ffeb9105419cf6292ba80750">size()</a> + n]</code>). </p>
<p>
</p>
<p><b>Example. </b>Consider a <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> with the capacity of 6 and the size of 4. Its internal buffer may look like the one below.<br>
<br>
 <code class="computeroutput">|1|2|3|4| | |</code><br>
 <code class="computeroutput">p ___^</code><br>
<br>
After inserting 5 elements before the position <code class="computeroutput">p</code>:<br>
<br>
 <code class="computeroutput">rinsert(p, (size_t)5, 0);</code><br>
<br>
actually only 4 elements get inserted and elements <code class="computeroutput">3</code> and <code class="computeroutput">4</code> are overwritten. This is due to the fact the rinsert operation preserves the capacity. After insertion the internal buffer looks like this:<br>
<br>
<code class="computeroutput">|1|2|0|0|0|0|</code><br>
 <br>
For comparison if the capacity would not be preserved the internal buffer would then result in <code class="computeroutput">|1|2|0|0|0|0|0|3|4|</code>. </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1affdfa9cdfa6f42ff67d8b463bc5af1f2">rinsert(iterator, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a689b81ea66407b95a20726a141feb54c">rinsert(iterator, InputIterator, InputIterator)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ab4a56a420d75236091bdeddb1b1224aa">insert(iterator, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1adc2060ce1105d80429ff3f004ca0691b">insert(iterator, size_type, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1aa981fae21385a0210ea69ce4a4cb7b92">insert(iterator, InputIterator, InputIterator)</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">pos</code></span></p></td>
<td><p>An iterator specifying the position where the <code class="computeroutput">item</code>s will be inserted. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">n</code></span></p></td>
<td><p>The number of <code class="computeroutput">item</code>s the to be inserted. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">item</code></span></p></td>
<td><p>The element whose copies will be inserted. </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">pos</code> is a valid iterator pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> or its end. </p></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p>The number of <code class="computeroutput">min[n, (<a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a> - pos) + <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a1235f424313eb295ea327db53a44f66f">reserve()</a>]</code> elements will be inserted before the position <code class="computeroutput">pos</code>.<br>
The number of <code class="computeroutput">min[<a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a> - pos, max[0, n - <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a1235f424313eb295ea327db53a44f66f">reserve()</a>]]</code> elements will be overwritten at the end of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>.<br>
(See <span class="emphasis"><em>Example</em></span> for the explanation.)<br>
<br>
 The amount of allocated memory in the internal buffer may be predictively increased. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::T(const T&amp;)</code> throws. Whatever <code class="computeroutput">T::operator = (const T&amp;)</code> throws. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> InputIterator<span class="special">&gt;</span> 
  <span class="keyword">void</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a689b81ea66407b95a20726a141feb54c"></a><span class="identifier">rinsert</span><span class="special">(</span><span class="identifier">iterator</span> pos<span class="special">,</span> <span class="identifier">InputIterator</span> first<span class="special">,</span> <span class="identifier">InputIterator</span> last<span class="special">)</span><span class="special">;</span></pre>Insert the range <code class="computeroutput">[first, last)</code> before the specified position. <p>



</p>
<p><b>Exception Safety. </b>Basic. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in <code class="computeroutput">[<a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1af051aec0ffeb9105419cf6292ba80750">size()</a> + std::distance(first, last)]</code>; in <code class="computeroutput">min[<a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a02126fefb68c4edaff62e3c47adf59d7">capacity()</a>.capacity(), <a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1af051aec0ffeb9105419cf6292ba80750">size()</a> + std::distance(first, last)]</code> if the <code class="computeroutput">InputIterator</code> is a <a href="https://www.boost.org/sgi/stl/RandomAccessIterator.html" target="_top">RandomAccessIterator</a>). </p>
<p>
</p>
<p><b>Example. </b>Consider a <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> with the capacity of 6 and the size of 4. Its internal buffer may look like the one below.<br>
<br>
 <code class="computeroutput">|1|2|3|4| | |</code><br>
 <code class="computeroutput">p ___^</code><br>
<br>
After inserting a range of elements before the position <code class="computeroutput">p</code>:<br>
<br>
 <code class="computeroutput">int array[] = { 5, 6, 7, 8, 9 };</code><br>
<code class="computeroutput">insert(p, array, array + 5);</code><br>
<br>
 actually only elements <code class="computeroutput">5</code>, <code class="computeroutput">6</code>, <code class="computeroutput">7</code> and <code class="computeroutput">8</code> from the specified range get inserted and elements <code class="computeroutput">3</code> and <code class="computeroutput">4</code> are overwritten. This is due to the fact the rinsert operation preserves the capacity. After insertion the internal buffer looks like this:<br>
<br>
<code class="computeroutput">|1|2|5|6|7|8|</code><br>
<br>
For comparison if the capacity would not be preserved the internal buffer would then result in <code class="computeroutput">|1|2|5|6|7|8|9|3|4|</code>. </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1affdfa9cdfa6f42ff67d8b463bc5af1f2">rinsert(iterator, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a1eff7ec0eb603d489bd12f8c48928c9d">rinsert(iterator, size_type, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1ab4a56a420d75236091bdeddb1b1224aa">insert(iterator, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1adc2060ce1105d80429ff3f004ca0691b">insert(iterator, size_type, value_type)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1aa981fae21385a0210ea69ce4a4cb7b92">insert(iterator, InputIterator, InputIterator)</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">pos</code></span></p></td>
<td><p>An iterator specifying the position where the range will be inserted. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">first</code></span></p></td>
<td><p>The beginning of the range to be inserted. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">last</code></span></p></td>
<td><p>The end of the range to be inserted. </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">pos</code> is a valid iterator pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> or its end.<br>
 Valid range <code class="computeroutput">[first, last)</code> where <code class="computeroutput">first</code> and <code class="computeroutput">last</code> meet the requirements of an <a href="https://www.boost.org/sgi/stl/InputIterator.html" target="_top">InputIterator</a>. </p></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p>Elements from the range <code class="computeroutput">[first, last - max[0, distance(first, last) - (<a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a> - pos) - <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a1235f424313eb295ea327db53a44f66f">reserve()</a>])</code> will be inserted before the position <code class="computeroutput">pos</code>.<br>
The number of <code class="computeroutput">min[<a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a> - pos, max[0, distance(first, last) - <a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a1235f424313eb295ea327db53a44f66f">reserve()</a>]]</code> elements will be overwritten at the end of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html" title="Class template circular_buffer">circular_buffer</a></code>.<br>
(See <span class="emphasis"><em>Example</em></span> for the explanation.)<br>
<br>
 The amount of allocated memory in the internal buffer may be predictively increased. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::T(const T&amp;)</code> throws. Whatever <code class="computeroutput">T::operator = (const T&amp;)</code> throws. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">iterator</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a36feadef225bd8a10962a92c4ffcdfd3"></a><span class="identifier">erase</span><span class="special">(</span><span class="identifier">iterator</span> pos<span class="special">)</span><span class="special">;</span></pre>Remove an element at the specified position. <p>




</p>
<p><b>Exception Safety. </b>Basic. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in the size of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>). </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a9e9a4e0dfca27329da78e014d97201ca">erase(iterator, iterator)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a6e96800422211d02621526c894b71fa1">rerase(iterator)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a54fd4c2a67c7d6de6cbf6c8255729e98">rerase(iterator, iterator)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a2aa1dd29bd9509b5482ca2666c61deab">clear()</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">pos</code></span></p></td>
<td><p>An iterator pointing at the element to be removed. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">pos</code> is a valid iterator pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (but not an <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p>The element at the position <code class="computeroutput">pos</code> is removed.<br>
<br>
 The amount of allocated memory in the internal buffer may be predictively decreased. </p></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>Iterator to the first element remaining beyond the removed element or <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code> if no such element exists. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::operator = (const T&amp;)</code> throws or nothing if <code class="computeroutput">T::operator = (T&amp;&amp;)</code> is noexcept. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">iterator</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a9e9a4e0dfca27329da78e014d97201ca"></a><span class="identifier">erase</span><span class="special">(</span><span class="identifier">iterator</span> first<span class="special">,</span> <span class="identifier">iterator</span> last<span class="special">)</span><span class="special">;</span></pre>Erase the range <code class="computeroutput">[first, last)</code>. <p>




</p>
<p><b>Exception Safety. </b>Basic. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in the size of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>). </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a36feadef225bd8a10962a92c4ffcdfd3">erase(iterator)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a6e96800422211d02621526c894b71fa1">rerase(iterator)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a54fd4c2a67c7d6de6cbf6c8255729e98">rerase(iterator, iterator)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a2aa1dd29bd9509b5482ca2666c61deab">clear()</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">first</code></span></p></td>
<td><p>The beginning of the range to be removed. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">last</code></span></p></td>
<td><p>The end of the range to be removed. </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>Valid range <code class="computeroutput">[first, last)</code>. </p></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p>The elements from the range <code class="computeroutput">[first, last)</code> are removed. (If <code class="computeroutput">first == last</code> nothing is removed.)<br>
<br>
 The amount of allocated memory in the internal buffer may be predictively decreased. </p></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>Iterator to the first element remaining beyond the removed elements or <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code> if no such element exists. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::operator = (const T&amp;)</code> throws or nothing if <code class="computeroutput">T::operator = (T&amp;&amp;)</code> is noexcept. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">iterator</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a6e96800422211d02621526c894b71fa1"></a><span class="identifier">rerase</span><span class="special">(</span><span class="identifier">iterator</span> pos<span class="special">)</span><span class="special">;</span></pre>Remove an element at the specified position. <p>




</p>
<p><b>Exception Safety. </b>Basic. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in the size of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>). </p>
<p>
</p>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>Basically there is no difference between <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a36feadef225bd8a10962a92c4ffcdfd3">erase(iterator)</a></code> and this method. It is implemented only for consistency with the base <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html" title="Class template circular_buffer">circular_buffer</a></code>. </p></td></tr>
</table></div>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a36feadef225bd8a10962a92c4ffcdfd3">erase(iterator)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a9e9a4e0dfca27329da78e014d97201ca">erase(iterator, iterator)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a54fd4c2a67c7d6de6cbf6c8255729e98">rerase(iterator, iterator)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a2aa1dd29bd9509b5482ca2666c61deab">clear()</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">pos</code></span></p></td>
<td><p>An iterator pointing at the element to be removed. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">pos</code> is a valid iterator pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (but not an <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>).<br>
<br>
 The amount of allocated memory in the internal buffer may be predictively decreased. </p></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p>The element at the position <code class="computeroutput">pos</code> is removed. </p></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>Iterator to the first element remaining in front of the removed element or <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1a3bf9f4a79d86ec4e2d79e98691364f11">begin()</a></code> if no such element exists. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::operator = (const T&amp;)</code> throws or nothing if <code class="computeroutput">T::operator = (T&amp;&amp;)</code> is noexcept. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">iterator</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a54fd4c2a67c7d6de6cbf6c8255729e98"></a><span class="identifier">rerase</span><span class="special">(</span><span class="identifier">iterator</span> first<span class="special">,</span> <span class="identifier">iterator</span> last<span class="special">)</span><span class="special">;</span></pre>Erase the range <code class="computeroutput">[first, last)</code>. <p>




</p>
<p><b>Exception Safety. </b>Basic. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in the size of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>). </p>
<p>
</p>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>Basically there is no difference between <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a9e9a4e0dfca27329da78e014d97201ca">erase(iterator, iterator)</a></code> and this method. It is implemented only for consistency with the base <code class="computeroutput">&lt;<a class="link" href="classboost_1_1circular__buffer.html" title="Class template circular_buffer">circular_buffer</a></code>. </p></td></tr>
</table></div>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a36feadef225bd8a10962a92c4ffcdfd3">erase(iterator)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a9e9a4e0dfca27329da78e014d97201ca">erase(iterator, iterator)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a6e96800422211d02621526c894b71fa1">rerase(iterator)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a2aa1dd29bd9509b5482ca2666c61deab">clear()</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">first</code></span></p></td>
<td><p>The beginning of the range to be removed. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">last</code></span></p></td>
<td><p>The end of the range to be removed. </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>Valid range <code class="computeroutput">[first, last)</code>. </p></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p>The elements from the range <code class="computeroutput">[first, last)</code> are removed. (If <code class="computeroutput">first == last</code> nothing is removed.)<br>
<br>
 The amount of allocated memory in the internal buffer may be predictively decreased. </p></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>Iterator to the first element remaining in front of the removed elements or <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1a3bf9f4a79d86ec4e2d79e98691364f11">begin()</a></code> if no such element exists. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). Whatever <code class="computeroutput">T::operator = (const T&amp;)</code> throws or nothing if <code class="computeroutput">T::operator = (T&amp;&amp;)</code> is noexcept. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a2aa1dd29bd9509b5482ca2666c61deab"></a><span class="identifier">clear</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>Remove all stored elements from the space optimized circular buffer. <p>

</p>
<p><b>Exception Safety. </b>Basic. </p>
<p>
</p>
<p><b>Iterator Invalidation. </b>Invalidates all iterators pointing to the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code> (except iterators equal to <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1aa53a64c8b84961bb622ee0c5a4882554">end()</a></code>). </p>
<p>
</p>
<p><b>Complexity. </b>Linear (in the size of the <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>). </p>
<p>
</p>
<p><b>See Also: </b><code class="computeroutput">~circular_buffer_space_optimized()</code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a36feadef225bd8a10962a92c4ffcdfd3">erase(iterator)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a9e9a4e0dfca27329da78e014d97201ca">erase(iterator, iterator)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a6e96800422211d02621526c894b71fa1">rerase(iterator)</a></code>, <code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer__space__optimized.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer__space__optimized_1a54fd4c2a67c7d6de6cbf6c8255729e98">rerase(iterator, iterator)</a></code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p><code class="computeroutput"><a class="link" href="classboost_1_1circular__buffer.html#doxygen.boost_circular_buffer_c___reference.classboost_1_1circular__buffer_1af051aec0ffeb9105419cf6292ba80750">size()</a> == 0</code><br>
<br>
 The amount of allocated memory in the internal buffer may be predictively decreased. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>An allocation error if memory is exhausted (<code class="computeroutput">std::bad_alloc</code> if the standard allocator is used). </td>
</tr>
</tbody>
</table></div>
</li>
</ol></div>
</div>
</div>
</div>
<div class="copyright-footer">Copyright © 2003-2013 Jan Gaspar<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="base_8hpp_1a3f0eb1ea2997575395414c96401ad3f1.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_circular_buffer_c___reference.html#doxygen.boost_circular_buffer_c___reference.space__optimized_8hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../circular_buffer/s14.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
